package belf.migrate.engine.job;

import belf.migrate.api.exception.APIErrorCode;
import belf.migrate.api.job.Job;
import belf.migrate.api.taskconf.Task;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class JobLog {
    private Task task;
    private Job job;
    /** 表示整个任务执行情况 */
    private JobStatus taskStatus;

    private Map<Long, JobStatus> subTaskStatusMap;

    private Date stopTime;

    private APIErrorCode errorCode;

    public enum JobStatus {
        SUCCESS,
        FAILTURE,
        NOT_PERFORMED
    }
}
